/**
 * 
 */
package org.vsg.stock.basic.persistence.mybatis;

import java.io.Serializable;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DataAccessException;
import org.vsg.stock.basic.domain.StockBlurRange;
import org.vsg.stock.basic.persistence.StockBlurRangeDao;

/**
 * @author Bill Vison
 *
 */
public class StockBlurRangeDaoImpl extends SqlSessionDaoSupport implements StockBlurRangeDao {

	private static final Logger logger = LoggerFactory.getLogger(StockBlurRangeDaoImpl.class);

	@Override
	public Set<StockBlurRange> findAllByStock(String stockCode)
			throws DataAccessException {
		String statement = "org.vsg.stock.basic.domain.mybatis.StockBlurRangeProxy." +
		"findAllByStock";

		Map<String,Serializable> params = new HashMap<String, Serializable>();
		params.put("stockCode", stockCode);

		List result  = this.getSqlSessionTemplate().selectList(statement, params);
		
		Set<StockBlurRange> stkBlurRangeSet = new LinkedHashSet<StockBlurRange>(result);

		return stkBlurRangeSet;
	}
		
	

	
}
